GXRasterPackageBitmap
QuickDraw GX sends theGXRasterPackageBitmap
message to translate a portion of a bitmap into a sequence of characters for an output device to print. If you are writing a printing extension or printer driver, you can override theGXRasterPackageBitmap
message to perform your own translation from bitmaps into character sequences for your output device. Your override of theGXRasterPackageBitmap
message must match the following formal declaration:
OSErr MyRasterPackageBitmap ( gxRasterPackageBitmapRec *whattoPackage, Ptr buffer, unsigned long *bufferPos, gxRasterImageDataHdl imageData);
whattoPackage
- The bitmap to translate and which part of it to package.
buffer
- The buffer for creating the sequence of characters.
bufferPos
- The location in the buffer to begin placing characters.
imageData
- A pointer to raster imaging-system-specific data. This structure is described in the section "Raster Imaging System Structure" beginning on page 4-23.
- function result
- An error code. The value
noErr
indicates that the operation was successful.DESCRIPTION
QuickDraw GX, in its default implementation of theGXRasterDataIn
message, sends theGXRasterPackageBitmap
message to create a sequence of characters that represent a portion of the bitmap on the device. This message is sent multiple times per bitmap: once for each head pass that is required to print the bitmap, as specified in the raster package ('rpck'
) resource.The default implementation of this message does nothing.
You always perform a total override of this message in your raster device driver to provide your own translation from bitmaps into a sequence of characters for the device. After translating part of the bitmap into a sequence of characters and storing this sequence into the buffer, you increment the buffer position (specified in the
bufferPos
parameter) by the number of bytes added to the buffer.SPECIAL CONSIDERATIONS
You never send theGXRasterPackageBitmap
message yourself.You can partially override the
GXRasterPackageBitmap
message in an extension. In a raster device driver, you always totally override this message.RESULT CODES
gxSegmentLoadFailedErr A required code segment could not be found,
or there was not enough memory to load it.gxPrUserAbortErr The user has canceled printing. SEE ALSO
ThegxRasterPackageBitmapRec
data type is described in the section
"Raster Package Bitmap Structure" on page 4-22.The raster imaging system structure is described on page 4-23.
The raster package control resource type is described on page 6-74 in the chapter "Printing Resources."
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help